package edu.java.texbooks.scjp.threads.test14;

public class Test {

	public static void main(String[] args) {
		Calculator calculator = new Calculator("Calculator");

		Reader reader1 = new Reader("Reader-1", calculator);
		Reader reader2 = new Reader("Reader-2", calculator);
		Reader reader3 = new Reader("Reader-3", calculator);

		// calculator.interrupt();

		// synchronized (calculator) {
		// calculator.start();
		// calculator.interrupt();
		// }

		reader1.start();
		reader2.start();
		calculator.start();
		reader3.start();

	}
}
